/**
 * 
 */
package com.softqin.washer.activity;


import com.softqin.washer.R;
import com.softqin.washer.common.WasherApp;
import com.softqin.washer.utils.DialogUtils;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;


/**
 * 

* @ClassName: SuggestionActivity 

* @Description: 意见反馈

* @author 杨守志

* @date 2015-1-13 上午11:16:41
 */
public class SuggestionActivity extends BaseActivity{
	public static final String TAG=SuggestionActivity.class.getSimpleName();
	private EditText suggestion;
	private EditText phoneNum;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_suggestion);
		WasherApp.getInstance().addActivity(this);
		initView();
	}
	private void initView(){
		initTitle();
		titleTv.setText(R.string.suggestion_title);
		suggestion=(EditText)findViewById(R.id.suggestion_edit);
		phoneNum=(EditText)findViewById(R.id.suggest_phone_num);
		findViewById(R.id.suggestion_submit_button).setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		super.onClick(v);
		switch (v.getId()) {
		case R.id.suggestion_submit_button:
			String advice=suggestion.getText().toString();
			String num=phoneNum.getText().toString();
			if (num.equals("")) {
				DialogUtils.showMsg("�������ֻ��",this);
			    phoneNum.requestFocus();
				return;
			}
			if (advice.equals("")) {
				DialogUtils.showMsg("�����뷴�����",this);
				suggestion.requestFocus();
				return;
			}
			break;
		}
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
	}
}
